﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Control_InsertGroupAccountControl : System.Web.UI.UserControl
{

    ListAndProcessData ws = new ListAndProcessData();

    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnAdd_Click1(object sender, EventArgs e)
    {
        bool a = false;
        if (DropDownList1.SelectedValue == "Male")
        {
            a = ws.InsertCustomer(txtFullNameCustomer.Text, txtAge.Text, 0, txtAddress.Text, txtPhone.Text, txtEmail.Text, txtCMND.Text);
        }
        if (DropDownList1.SelectedValue == "FeMale")
        {
            a = ws.InsertCustomer(txtFullNameCustomer.Text, txtAge.Text, 1, txtAddress.Text, txtPhone.Text, txtEmail.Text, txtCMND.Text);
        }


        if (a == true)
        {
            Response.Redirect("Customer_Admin.aspx");

        }
        else
        {
            Response.Redirect("Default3.aspx");
        }
    }
    protected void btnreset_Click(object sender, EventArgs e)
    {

    }
}